-- GENERATED SPELL FOR [Alliance Commander] --


function spell0_27949(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(31403,pUnit)
pUnit:RegisterEvent('Sorts_27949', 560, 1)
end

function spell1_27949(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(60067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27949', 2000, 1)
end

function spell2_27949(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_27949', 602, 1)
end

function spell3_27949(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_27949', 2000, 1)
end

function Sorts_27949(pUnit, Event)
local choix_sorts_27949 = math.random(0, 3)
if choix_sorts_27949 == 0 then
pUnit:RegisterEvent('spell0_27949', 1, 1)
end
if choix_sorts_27949 == 1 then
pUnit:RegisterEvent('spell1_27949', 1, 1)
end
if choix_sorts_27949 == 2 then
pUnit:RegisterEvent('spell2_27949', 1, 1)
end
if choix_sorts_27949 == 3 then
pUnit:RegisterEvent('spell3_27949', 1, 1)
end
end

function mob27949_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27949', math.random(1500, 3000), 1)
end

function mob27949_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27949_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27949_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27949, 1, 'mob27949_Action')
RegisterUnitEvent(27949, 2, 'mob27949_Leave')
RegisterUnitEvent(27949, 3, 'mob27949_Kill')
RegisterUnitEvent(27949, 4, 'mob27949_Die')
